<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="microTables.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="jquery-3.2.1.js" ></script>
<script type="text/javascript" src="microTables.js"></script>
<title>编辑表格数据</title>
</head>
<body>
<table id="microTables" cellpadding="0" cellspacing="0" style="table-layout:fixed"></table>
</body>
<script language="javascript">
  $('#microTables').microtable({
    Dataurl:"yxjcj.json",
    Datamethod:"local",
    FixedColumns:[{"field":"xhgg","name":"xhgg","title":"型号规格","width":"150","class":"align-center align-middle","editor":{"type":"text"}}],
    Columns:[     
      {"field":"wqgj","name":"wqgj","title":"外圈沟径","hidden":"true","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"wgjj","name":"wqjj","title":"外圈<br>沟间距","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"wqgdql","name":"wqgdql","title":"外圈<br>沟道曲率","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"nqgj","name":"nqgj","title":"内圈沟径","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"ngjj","name":"nqjj","title":"内圈<br>沟间距","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"nqgdql","name":"nqgdql","title":"内圈<br>沟道曲率","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"gqzj","name":"gqzj","title":"钢球<br>直径","width":"60","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"gqs","name":"gqs","title":"钢球<br>数量","width":"40","class":"align-center align-middle","editor":{"type":"text"}},
      {"field":"yx","name":"yx","title":"游隙","width":"60","class":"align-center align-middle","expression":"Math.sqrt(4*Math.pow(Number(wqgdql)+Number(nqgdql)-Number(gqzj),2)-Math.pow(Number(nqgj)+2*(Number(wqgdql)+Number(nqgdql))-Number(wqgj),2))-(Number(wgjj)-Number(ngjj))","format":"#.0000"},
      {"field":"jcj","name":"jcj","title":"接触角(°)","width":"60","class":"align-center align-middle","expression":"Math.acos(((Number(nqgj)+2*(Number(wqgdql)+Number(nqgdql))-Number(wqgj))/2)/(Number(wqgdql)+Number(nqgdql)-Number(gqzj)))*180/Math.PI","format":"#.00"},
      {"field":"memo","name":"memo","title": "备注","width":"237","class":"align-center align-middle","editor":{"type":"text"}}
    ],
    CheckBox:true,
    Striped:true,
    Pagination:true,
    Width:"100%",
    CellEdit:true,
    EditModel:"dblclick",
    BottomToolbar:true,
    MouseOverRow:true
  });  
</script>
</html>

